(function () {
  const handMessage = event => {
    if (event.data.code === 211) {
      const iframeTag = event.data.iframeTag;
      const iframeBoxDom = document.querySelector(`[iframe="${iframeTag}"]`);
      iframeBoxDom.style.height = event.data.scrollHeight + 'px';
    }
  };

  // 保证只有一个消息监听
  window.onmessage = handMessage;
})();
